<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::group(['prefix'=>'admin','namespace'=>'Admin'],function(){
	Route::match(['get','post'],'/','Index@login');
	Route::match(['get','post'],'register','Index@register');
	Route::match(['get','post'],'forget','Index@forget');
	Route::match(['post'],'rest','Index@rest');

	Route::group(['middleware'=>'admin.login'],function(){
		
	Route::match(['get'],'index','Home@index');
	Route::match(['post'],'loginout','Home@loginout');

	Route::match(['get'],'catelist','Cate@all');
	Route::match(['get','post'],'cateadd','Cate@cateadd');
	
	Route::match(['get'],'adminlist','Admin@all');
	Route::match(['get','post'],'adminadd','Admin@add');

	});

});